package day3;

public class Demo7 {

    public static void main(String[] args) {
        Demo7 d = new Demo7();
        d.table();
        d.Flow();
    }

    public  void table(){
        for (int i = 1; i < 10; i++){
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" +  i * j + "\t");
            }
            System.out.println();
        }
    }

    public void Flow(){
        for (int i = 0; i < 1000; i++){
            int bai = i / 100;
            int shi = (i - 100 * bai) / 10;
            int ge = i - 100 * bai - 10 * shi;
            if (i == (bai*bai*bai + shi*shi*shi + ge*ge*ge)){
                System.out.println(i);
            }
        }
    }
}
